<!--
  ~
  ~   ~ MIT License
  ~   ~
  ~   ~ Copyright (c) 2021-2022 yangrunkang
  ~   ~
  ~   ~ Author: yangrunkang
  ~   ~ Email: yangrunkang53@gmail.com
  ~   ~
  ~   ~ Permission is hereby granted, free of charge, to any person obtaining a copy
  ~   ~ of this software and associated documentation files (the "Software"), to deal
  ~   ~ in the Software without restriction, including without limitation the rights
  ~   ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  ~   ~ copies of the Software, and to permit persons to whom the Software is
  ~   ~ furnished to do so, subject to the following conditions:
  ~   ~
  ~   ~ The above copyright notice and this permission notice shall be included in all
  ~   ~ copies or substantial portions of the Software.
  ~   ~
  ~   ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  ~   ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  ~   ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  ~   ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  ~   ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  ~   ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  ~   ~ SOFTWARE.
  ~
  -->

<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      th:replace="index">
<!--css-->
<link th:fragment="css" type="text/css" rel="stylesheet" th:href="${ossStatic} + @{/css/admin/content.css}"/>
<!--脚本-->
<script async="async" th:fragment="js" type="text/javascript" th:src="${ossStatic} + @{/js/admin/content.js}"></script>
<div th:fragment="content">
    <div class="container">
        <div class="card border-0 rounded-3 p-2 mb-2">
            <div class="lead border-bottom mb-2">文章管理</div>
            <div class="mb-1">标题:</div>
            <h3> [[${contentIndexDto.contentEnhance.content.title}]]</h3>
        </div>

        <div class="card border-0 rounded-3 p-2 mb-2">
            <h5 class="lead  border-bottom mb-2">设置关键字</h5>
            <div class="row g-2">
                <div class="col-1">
                    <h5 class="lead fw-bold text-primary">关键字</h5>
                </div>
                <div class="col-11">
                    <input class="form-control" type="text" id="keywords"
                           th:value="${contentIndexDto.contentEnhance.content.keywords}"/>
                    <button class="ui primary button mt-2"
                            th:onclick="setKeywords([[${contentIndexDto.contentEnhance.content.contentId}]])">设置
                    </button>
                </div>
            </div>
        </div>

        <div class="card border-0 rounded-3 p-2 mb-2">
            <h5 class="lead border-bottom mb-2">处理无效内容</h5>
            <div class="row g-2">
                <div class="col-1">
                    <h5 class="lead fw-bold text-primary">设置状态</h5>
                </div>
                <div class="col-11">
                    <select class="form-select" id="admin_set_content_status">
                        <option th:each="contentStatus : ${contentStatusList}"
                                th:value="${contentStatus.name()}"
                                th:selected="${contentIndexDto?.contentEnhance?.content.status.name() == contentStatus.name()}"
                        >
                            [[${contentStatus.name}]]
                        </option>
                    </select>
                    <button class="ui primary button mt-2"
                            th:onclick="setContentStatus([[${contentIndexDto.contentEnhance.content.contentId}]])">设置
                    </button>
                </div>
            </div>
        </div>
    </div>
</div>
</html>
